<script type="text/javascript">
$(document).ready(function(){
    //  When user clicks on tab, this code will be executed
    $("#tabs li").click(function() {
        //  First remove class "active" from currently active tab
        $("#tabs li").removeClass('active');
 
        //  Now add class "active" to the selected/clicked tab
        $(this).addClass("active");
 
        //  Hide all tab content
        $(".tab_content").hide();
 
        //  Here we get the href value of the selected tab
        var selected_tab = $(this).find("a").attr("href");
 
        //  Show the selected tab content
        $(selected_tab).fadeIn();
 
        //  At the end, we add return false so that the click on the link is not executed
        return false;
    });
});
</script>

<div id="tabs_container">
    <ul id="tabs">
        <li class="active"><a href="#tab1">Română</a></li>
        <li><a href="#tab2">Rusă</a></li>
        <li><a href="#tab3">Engleza</a></li>
    </ul>
</div>

<div id="tabs_content_container">
    <div id="tab1" class="tab_content" style="display: block;">
        <p>
			<div class="row">
				<?php echo $form->labelEx($model,'title'); ?>
				<?php echo $form->textField($model,'title',array('size'=>80,'maxlength'=>128)); ?>
				<?php echo $form->error($model,'title'); ?>
			</div>
		
			<div class="row">
				<?php echo $form->labelEx($model,'content'); ?>
				<?php
					Yii::import('ext.krichtexteditor.KRichTextEditor');
					$this->widget('KRichTextEditor', array(
						'model' => $model,
						'value' => $model->isNewRecord ? $model->content : '',
						'attribute' => 'content',
						'options' => array(
							'theme_advanced_resizing' => 'true',
							'theme_advanced_statusbar_location' => 'bottom',
							'width' => 400,
						),
					));?>
				<?php echo $form->error($model,'content'); ?>
			</div>
		</p>
    </div>
    <div id="tab2" class="tab_content">
        <p>
			<div class="row">
				<?php echo $form->labelEx($model,'title_ru'); ?>
				<?php echo $form->textField($model,'title_ru',array('size'=>80,'maxlength'=>128)); ?>
				<?php echo $form->error($model,'title_ru'); ?>
			</div>
		
			<div class="row">
				<?php echo $form->labelEx($model,'content_ru'); ?>
				<?php
					//Yii::import('ext.krichtexteditor.KRichTextEditor');
					$this->widget('KRichTextEditor', array(
						'model' => $model,
						'value' => $model->isNewRecord ? $model->content : '',
						'attribute' => 'content_ru',
						'options' => array(
							'theme_advanced_resizing' => 'true',
							'theme_advanced_statusbar_location' => 'bottom',
							'width' => 400,
						),
					));?>
				<?php echo $form->error($model,'content_ru'); ?>
			</div>
		</p>
    </div>
    <div id="tab3" class="tab_content">
        <p>
			<div class="row">
				<?php echo $form->labelEx($model,'title_en'); ?>
				<?php echo $form->textField($model,'title_en',array('size'=>80,'maxlength'=>128)); ?>
				<?php echo $form->error($model,'title_en'); ?>
			</div>
		
			<div class="row">
				<?php echo $form->labelEx($model,'content_en'); ?>
				<?php
					//Yii::import('ext.krichtexteditor.KRichTextEditor');
					$this->widget('KRichTextEditor', array(
						'model' => $model,
						'value' => $model->isNewRecord ? $model->content : '',
						'attribute' => 'content_en',
						'options' => array(
							'theme_advanced_resizing' => 'true',
							'theme_advanced_statusbar_location' => 'bottom',
							'width' => 400,
						),
					));?>
				<?php echo $form->error($model,'content_en'); ?>
			</div>
		</p>
    </div>
</div>